Component({
  data: {
    selected: 0,
    color: "#7A7E83",
    selectedColor: "#3cc51f",
    list: [{
      pagePath: "/pages/index/index",
      iconPath: "/image/sy.png",
      selectedIconPath: "/image/sy.png",
      text: "首页"
    }, 
    {
      pagePath: "/pages/mine/mine",
      iconPath: "/image/AI.jpg",
      selectedIconPath: "/image/AI.jpg",
      text: "智能"
    }
    // , 
    // {
    //   pagePath: "/pages/logs/logs",
    //   iconPath: "/image/icon_API.png",  // 图标图片不存在！
    //   selectedIconPath: "/image/icon_API_HL.png",
    //   text: "我的"
    // }
  ]
  },
  attached() {
  },
  methods: {
    switchTab(e) {
      const data = e.currentTarget.dataset
      const url = data.path
      wx.switchTab({url})
      this.setData({
        selected: data.index
      })
    }
  }
})
